Voltage across an on-board power source varies depending on the status of loads, which may lead to a phenomenon in which lighting loads such as various kinds of lamps flicker. In view of this problem, for example, there is a disclosure of a power source control device for vehicles that detects voltage from an on-board power source, calculates a duty ratio from the detected voltage and a predetermined voltage, performs pulse width modulation (PWM) control on the voltage from the on-board power source, using the duty ratio thus calculated, and then supplies the voltage to the lighting loads (see JP 2013-255402A).
In PWM control, brightness maintaining control is performed on the lighting loads, using a timer signal output from a timer port that is provided in a microcomputer (or microprocessor). Power supply to the lighting loads is controlled by using an intelligent power device (IPD). The IPD has a monitor terminal for current flowing to the lighting loads, and detects current to the lighting loads using a microcomputer. Information regarding the detected current is used for protecting the lighting loads and the wire harness, and detecting disconnection.
FIG. 31 is a block diagram showing a first example of a power source control device that performs conventional PWM control using a microcomputer. As shown in FIG. 31, the power source control device is provided with a given number of IPDs, the given number corresponding to the number of lighting loads. The microcomputer is provided with a PWM period timer, and a given number of DUTY timers, the given number corresponding to the number of IPDs. The microcomputer outputs an ON/OFF instruction (a PWM signal) from each of the DUTY timers to the corresponding IPD. In the example shown in FIG. 31, the number of timer ports required is the same as the number of lighting loads that require brightness maintaining control. Generally, a microcomputer having a large number of timer ports is expensive, and it is difficult to achieve cost reduction.
Also, in a configuration in which only one PWM period timer is provided as shown in FIG. 31, there is a problem in that the phases of the lighting loads in the PWM control coincide, the IPDs are caused to perform the ON operation at the same time, inrush current flowing to the lighting loads increases, and noise (conduction noise or radiation noise) increases.
FIG. 32 is a block diagram showing a second example of a power source control device that performs conventional PWM control using a microcomputer. In the example shown in FIG. 32, a PWM period timer is provided for each IPD, and it is possible to shift (displace) the phases of the lighting loads from one another. Therefore, it is possible to suppress inrush current flowing to the lighting loads, and reduce noise (conduction noise or radiation noise). However, timers for phase shifting are also required, and it is further difficult to achieve cost reduction.
Furthermore, since phase shifting is performed, the timing at which the IPD is caused to perform the ON operation is different for each lighting load. In order to detect output current flowing to the lighting loads, it is necessary to detect the current during the period in which the IPDs are ON. However, since the microcomputer is not in synchronization with the PWM period timer, it is impossible to know when the respective IPDs are ON. Therefore, an additional circuit is required in order to notify the microcomputer of the time each IPD is ON (the time AD conversion for current detection is performed).
FIG. 33 is a time chart showing an example of conventional PWM control using a microcomputer. The chart in FIG. 33 shows, from top to bottom, ON/OFF of a load driving instruction that is externally provided, a DUTY timer register value that is based on the load driving instruction (the value of the duty ratio that is externally provided), a period timer, a DUTY timer count value, and an output waveform. As shown in FIG. 33, it is assumed that the load driving instruction is switched from OFF to ON and the duty ratio is updated from 0% to 50%. If the load driving instruction (duty ratio update) is received from an external ECU, usually, the DUTY update for the timer port is reflected in the next PWM period after the duty ratio has been updated. Therefore, there is the problem that it is impossible, even if necessary, to light up a lighting device immediately after an instruction to light up the lighting device is received from an external ECU, and a delay time corresponding to one PWM period at the maximum occurs.
The present invention has been made in view of the above-described situation, and aims to provide a power source control device that realizes multi-channel PWM control without using a timer port, and a power source control method for the same.